package com.geek.javase.ch18.videodemo.pattern.decoration;

/*
 *@Date 2025/11/6
 *@Author wangpeng
 *@Description
 * 装饰类-高效的读操作
 */
public class BufferedInputStream extends InputStream {

    private InputStream inputStream;
    //传入文件读文件、传入内存读内存
    public BufferedInputStream( InputStream inputStream) {
        this.inputStream = inputStream;
    }
    @Override
    public int read() {
        System.out.println("高效的读操作...");
        inputStream.read();
        return 0;
    }
}
